<template>
    <div class="p-2">
        <transition>
            <el-tabs v-model="activeTab" @tab-click="handleClick">
                <el-tab-pane label="入库记录" name="warehouseEntryRecord">
                    <warehouseEntryRecord v-if="activeTab == 'warehouseEntryRecord'" />
                </el-tab-pane>
                <el-tab-pane label="入库详单" name="inventoryListDetailed">
                    <inventoryListDetailed v-if="activeTab == 'inventoryListDetailed'" />
                </el-tab-pane>
            </el-tabs>
        </transition>
    </div>
</template>
<script setup lang="ts">
import type { TabsPaneContext } from 'element-plus'
import warehouseEntryRecord from './warehouseEntryRecord.vue'
import inventoryListDetailed from './inventoryListDetailed.vue'


const activeTab = ref('warehouseEntryRecord');

/**
 * tabs切换
 */
const handleClick = (tab: TabsPaneContext, event: Event) => {
    console.log(tab.props.name, event)
};

</script>
<style lang="scss" scoped>
.mb96 {
    margin-bottom: 96px;
}
</style>